<div class="block">

    <div class="block_head">
        <div class="bheadl"></div>
        <div class="bheadr"></div>

       <h2><?php echo $title_form; ?></h2>
        <ul>
            <li><a href="cms/news/">Trở về trang trước</a></li>
        </ul>

    </div>		<!-- .block_head ends -->



    <div class="block_content">
        <?php echo isset($msg)?'<div class="message info"><p>'.$msg.'</p></div>':''; ?>
        <form action="" method="post" enctype="multipart/form-data">
            <input type="hidden" value="<?php echo $news_id ?>" name="news_id" />
            <input type="hidden" value="<?php echo $image ?>" name="image" />
             <p>
                <label>Tiêu đề</label><br />
                <input type="text" name="title" value="<?php echo $title; ?>" class="text small" />
            </p>

            <p>
                <label>Ảnh đại diện:</label><br />
                <?php echo form_upload(array('name' => 'image', 'id' => 'image', 'value' => '')); ?>
                <br/>
                <?php
				if($image != ""){
                    ?>
                    <img src="uploads/news/<?php echo $image; ?>" width="100" height="100" />
                <?php
                }
                ?>
            </p>

            <p>
                <label>Kiểu:</label><br />
                <?php $status_value = array('1' => 'Thể lệ', '0' => 'Tin tức'); ?>
                <?php foreach($status_value as $k => $v): ?>
                    <?php
					if($k == $type){
                        echo form_radio('type', $k, TRUE)." ".$v;

                    } else {
                        echo form_radio('type', $k)." ".$v;
                    }
                    ?>
                <?php endforeach; ?>
            </p>
            <p>
                <label>Trạng thái:</label><br />
                <?php $status_value = array('0' => 'Ẩn', '1' => 'Hiện'); ?>
                <?php foreach($status_value as $k => $v): ?>
                    <?php
                    if($k == $status){
                        echo form_radio('status', $k, TRUE)." ".$v;

                    } else {
                        echo form_radio('status', $k)." ".$v;
                    }
                    ?>
                <?php endforeach; ?>
            </p>
			 <p>
                <label>Nội dung</label><br />
                <input type="text" name="body" value="<?php echo $body; ?>" class="text small" />
            </p>
			 <p>
                <label>Ghi chú</label><br />
                <input type="text" name="note" value="<?php echo $note; ?>" class="text small" />
            </p>
            <hr />

            <p>
                <input type="submit" class="submit small" value="Lưu" />
            </p>
        </form>


    </div>		<!-- .block_content ends -->

    <div class="bendl"></div>
    <div class="bendr"></div>
</div>		<!-- .block ends -->